import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.pink
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('container和text组件')
        ),
        body: HomePage(),
      )
    );
  }
}


class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Center(
      child: Container(
        child: Text('测试文本abc测试文本abc测试文本abc测试文本abc测试文本abc',
        textAlign: TextAlign.left,
        overflow: TextOverflow.ellipsis,
        maxLines: 2,
        textScaleFactor: 1.1,
        style: TextStyle(
          color: Colors.white,
          fontSize: 15,
          fontWeight: FontWeight.w900,
          fontStyle: FontStyle.italic,
          decoration: TextDecoration.lineThrough,
          decorationColor: Colors.blue,
          decorationThickness: 5.0,
          decorationStyle: TextDecorationStyle.dashed,
          letterSpacing: 3.0
        ),),
        width: 200,
        height: 200,
        decoration: BoxDecoration(
          color: Colors.red,
          border: Border.all(
            color: Colors.green,
            width: 5.0
          ),
          borderRadius: BorderRadius.all(Radius.circular(10)),
        ),
        padding: EdgeInsets.fromLTRB(10, 10, 5, 0),
        transform: Matrix4.translationValues(10.0, 10.0, 10.0),
      )
    );
  }
}